<div class="linksedit">
	<form action="<?php echo url('links/edit');?>" method="post" id="addForm">
		<table>
			<tr>
				<td class="inputtxt" align="right" width="80"><span>连接名称</span></td>
				<td align="left">
					<input type="text" class="required" name="links[title]" value="<?php echo $links['title']?>" />
					<span style="color:red; margin-left: 6px;">*</span>
				</td>
			</tr>
			<tr>
				<td class="inputtxt" align="right"><span>连接地址</span></td>
				<td align="left">
					<input type="text" class="required" name="links[url]" value="<?php echo $links['url']?>" />
					<span style="color:red; margin-left: 6px;">*</span>
				</td>
			</tr>
			<tr>
				<td class="inputtxt" align="right"><span>排序ID</span></td>
				<td align="left">
					<input type="text" class="required" name="links[sortID]" value="<?php echo $links['sortID']?>" />
					<span style="color:red; margin-left: 6px;">*</span>
				</td>
			</tr>
			<tr>
				<td class="inputtxt" align="right"><span>链接图片</span></td>
				<td align="left" class="magin"><?php echo fetch('uploadImg',array('images'=>array(array('src'=>$links['src'])),'limit'=>1));?></td>
			</tr>
			<tr><td colspan="2" align="right"><input type="submit" value="修改" id="catesub" /></td></tr>
		</table>
                <input type="hidden" name="id" value="<?php echo $links['id'];?>" />
	</form>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$("#wBox .wBox_body").css("width","330");
	submitForm("#addForm",{
		dataType:'json',
		success:function(data){
				if(data.i=='ok'){
					location.href="<?php echo url('links/index');?>";
				}else{
					alert(data.i);
				}
			},
	});
});
</script>
